﻿using Microsoft.Win32;

namespace CSP.CRM.Deployer
{
  public class CRMRegistry
  {
    private static RegistryKey crmRegistryKey;

    static CRMRegistry()
    {
      crmRegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM", false);
    }

    public static string CrmServerUrl
    {
      get { return (string)crmRegistryKey.GetValue("ServerUrl"); }
    }

    public static string CrmWebSitePath
    {
      get { return (string)crmRegistryKey.GetValue("WebSitePath"); }
    }

    public static int CrmPort
    {
      get { return (int)crmRegistryKey.GetValue("LocalSdkPort"); }
    }


    public static string CspIsvPath
    {
      get { return CrmWebSitePath + @"\ISV\CSP"; }
    }






  }
}
